<template>
  <section>
    <swiper :options="swiperOption" v-if="listswiper.length>0">
      <swiper-slide v-for="item of listswiper" :key="item.id" >
        <img :src="item.imgurl">
      </swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
  </section>
</template>

<script>
export default {
  name: 'carrousel',
  props: {
    listswiper: Array
  },
  data () {
    return {
      swiperOption: {
        autoplay: {
          delay: 2500,
          disableOnInteraction: false
        },
        pagination: {
          el: '.swiper-pagination'
        },
        loop: true
      }
    }
  }
}
</script>

<style lang="stylus" scoped="scoped">
  section >>> .swiper-pagination-bullet-active
    background #ffffff
  section
    img
      width 100%
</style>
